package com.kc.sjwh.entity.vo.dict;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 字典中的某一类(字典项的集合)
 * @author zhangGuihua(hua7381@163.com) 2017年6月6日
 */
public class DictType implements Serializable {
	private List<DictItem> list;
	private Map<String,String> map;
	
	public DictType() {
	}
	
	public DictType(List<DictItem> list, Map<String, String> map) {
		this.list = list;
		this.map = map;
	}
	
	/**根据id查找某一字典项对象*/
	public DictItem getItemById(String id) {
		for(DictItem one : list) {
			if(one.getId().equals(id)) {
				return one;
			}
		}
		return null;
	}
	
	public List<DictItem> getList() {
		return list;
	}
	public void setList(List<DictItem> list) {
		this.list = list;
	}
	public Map<String, String> getMap() {
		return map;
	}
	public void setMap(Map<String, String> map) {
		this.map = map;
	}
}
